package com.laf.manage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.laf.common.core.page.TableDataInfo;
import com.laf.manage.domain.doc.ReceiveRecordDoc;
import com.laf.manage.domain.dto.PageDTO;
import com.laf.manage.domain.po.ReceiveRecord;
import com.laf.manage.domain.query.ReceiveRecordQuery;
import com.laf.manage.domain.vo.ReceiveRecordVO;
import com.laf.manage.domain.vo.RecordDetailsVO;

import java.util.List;

/**
 * 领取记录Service接口
 *
 * @author zian
 * @date 2024-11-01
 */
public interface IReceiveRecordService extends IService<ReceiveRecord> {

    /**
     * 查询领取记录列表
     *
     * @param receiveRecord 领取记录
     * @return 领取记录集合
     */
      List<ReceiveRecord> selectReceiveRecordList(ReceiveRecord receiveRecord);

    /**
     * 分页查询领取记录列表 ---> es
     * @param receiveRecord 查询条件
     * @param pageNum 页码
     * @param pageSize 页大小
     * @return 列表数据以及总页数等信息
     */
    TableDataInfo selectReceiveRecordList(ReceiveRecord receiveRecord , Integer pageNum , Integer pageSize);

    /**
     * 根据id查询领取记录
     * @param id  领取记录id
     * @return
     */
    ReceiveRecordVO getInfoById(Long id);

    /**
     * 获取当前用的取领取记录列表
     * @param query
     * @return
     */
    PageDTO<ReceiveRecordDoc> getCurrentReceiveRecordList(ReceiveRecordQuery query);

    /**
     * 获取领取记录详情
     * @param id 记录id
     * @return
     */
    RecordDetailsVO getReceiveRecordDetails(Long id);

    /**
     * 根据物品id获取领取记录
     * @param itemId 物品id
     * @return
     */
    ReceiveRecordVO getInfoByItemId(Long itemId);
}
